DSEG SEGMENT
a DW 00H
b DW 00H
c DW 00H
d DW 00H
e DW 00H
f DW 00H
g DW 00H
t10 DW 00H
t11 DW 00H
t12 DW 00H
t13 DW 00H
t16 DW 00H
t18 DW 00H
t19 DW 00H
t20 DW 00H
t3 DW 00H
t7 DW 00H
t9 DW 00H
arr  DB  100 DUP(0)
DSEG ENDS
SSEG SEGMENT
SKTOP DW 200 DUP(0)
SSEG ENDS
CSEG SEGMENT
ASSUME DS:DSEG,CS:CSEG,SS:SSEG
testProc  PROC
PUSH AX
PUSH BX
PUSH CX
PUSH DX
MOV AX,a
ADD AX,b
MOV BX,b
SUB BX,AX
POP DX
POP CX
POP BX
POP AX
RET 
testProc ENDP
complexFunc  PROC
PUSH AX
PUSH BX
PUSH CX
PUSH DX
MOV CX,AX
SUB AX,0
JNE S1
CALL testProc
JMP  S2
S1: 
POP DX
POP CX
POP BX
POP AX
RET 
complexFunc ENDP
S2: 
MOV DX,CX
SUB CX,2
POP DX
POP CX
POP BX
POP AX
RET 
complexFunc ENDP
START: MOV AX,DSEG
MOV DS,AX
MOV AX,SSEG
MOV SS,AX
LEA SI,SKTOP
MOV b,BX
MOV BX,f
SUB BX,g
MOV e,BX
MOV BX,0
ADD BX,60
MOV t7,BX
ADD BX,10
MOV t3,AX
MOV AX,c
MOV dCX
MUL BYTE PTR d
LEA DI,arr
ADD DI,BX
MOV [DI],AX
S3: 
MOV a,DX
MOV DX,b
SUB DX,8
JE S4
CALL testProc
JMP  S3
S4: 
MOV d,CX
MOV CX,e
SUB CX,0
JNA S5
CALL complexFunc
MOV t9,BX
MOV BX,a
AND BX,BX
JMP  S8
S5: 
S6: 
SUB 2,0
JNA S7
MOV b,BX
MOV BX,0
ADD BX,0
MOV t16,BX
ADD BX,12
LEA DI,arr
ADD DI,BX
MOV DI,[DI]
MOV t19,DI
MOV t10,AX
MOV AX,d
SUB AX,t19
JMP  S6
S7: 
S8: 
MOV AX,4C00H
INT 21H
CSEG ENDS
END START